package ilearn.seata.job.java8.buss.controller;

import ilearn.seata.job.java8.buss.client.entity.Order;
import ilearn.seata.job.java8.buss.service.BussinessService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
public class BussinessController {

    @Resource
    private BussinessService bussinessService;

    @GetMapping("/sale")
    public Order sale(String goods, String accId, String name, BigDecimal amt){
        return bussinessService.sale(goods,accId,name,amt);
    }
}
